/* This class defines a message.
 * The main part is Data which is string.
 * User can specify a Retransmitcounter, so if an error occured during sending process,
 * the Communicationmanager will retry to send it.
 * Note: it has 2 constructors.
 */

package org.kth.dks.dks_comm;

public class Message {
  private byte [] data = null;

  public Message( byte [] newdata ) { //Outgoing messages
    data = newdata;
  }

  public Message( byte [] newdata, int newid ) { //Incomming messages or ACK(newid=0)
    data = newdata;
  }

  public byte [] getData() {
    return data;
  }
}//Message class
